<?php
require_once(OC::$SERVERROOT . "/apps/reports/lib/helper.php");

$LoginStats = PUtil::checkUserLogin(true);
if ($LoginStats !== true) {
   echo $LoginStats;
   exit();
}

OCP\JSON::callCheck();

$companyid = PFactory::getMasterUser()->id;
$fid = JRequest::getInt('fid', 0);

if(PReportsHelper::updateJobgroup($fid, $companyid, 'reports')) {
   OCP\JSON::success();
} else {
   OC_JSON::error(array('data' => array( 'message' => '系统错误')));
}
